using System;
using System.Collections;
using Toolkit;

namespace GameService {

public abstract class CallNativeGameServiceI {

    public static NewSet CMD = NewSet.create(103149417,3441010,-1538971451,1193247675);

    // //////////////////////////////////////////////
    // 逻辑分发
    // //////////////////////////////////////////////

    public void disp(int cmd, int succ, string msg, object attach) {
        switch (cmd) {
            case 103149417: { //  登陆
                onLogin(cmd, succ, msg, attach);
                return;
            }
            case 3441010: { //  ping
                onPing(cmd, succ, msg, attach);
                return;
            }
            case -1538971451: { //  提交新手任务步奏
                onSubmitNewTaskIndex(cmd, succ, msg, attach);
                return;
            }
            case 1193247675: { //  设置昵称密码
                onSetNameAndPass(cmd, succ, msg, attach);
                return;
            }
        }
        throw new Exception(" cmd: " + cmd +  " not found processor.");
    }


    // //////////////////////////////////////////////
    // 需要实现的接口
    // //////////////////////////////////////////////

    public abstract void OnExcept(Exception e, int stat, string msg);
    // 登陆
    public abstract void onLogin(int cmd, int succ, string msg, object attach);

    // ping
    public abstract void onPing(int cmd, int succ, string msg, object attach);

    // 提交新手任务步奏
    public abstract void onSubmitNewTaskIndex(int cmd, int succ, string msg, object attach);

    // 设置昵称密码
    public abstract void onSetNameAndPass(int cmd, int succ, string msg, object attach);

    }
}
